SunSystems Overview
Infor SunSystems is accounting software commonly integrated with UniFi. SunSystems has an API called SunSystems Connect (SSC) which allows data in SunSystems to be extracted and used within UniFi external fields such as dropdowns. SSC uses XML as its standard format and has an authentication process that involves obtaining a security token and then using that token to authenticate when asking for data. This is therefore a good example of a multi-step data connector that converts from XML to JSON as part of the process.
In order to use SSC (or indeed any API) from UniFi it must be 'outward facing' i.e. available outside your local network. For users who have on-premise software installations (i.e. installed on a corporate network rather than in the cloud) this is likely to involve some technical configuration and some additional security considerations such as having an SSL certificate
Overview of the process
In order to produce a listing of suppliers the data connector must do the following:
- Call a security API with user account credentials (User ID and password)
- Parse the response to obtain a security token
- Construct a query including that token requesting the supplier details required
- Send that query to the main SSC API
- Parse the response to read the supplier details
- Convert that response from XML to JSON
Adapting existing data connectors
If you already have some advanced data connectors that work with SunSystems you will probably find its better to use these as a starting point rather than build one from scratch. The steps needed to adapt an existing data connector to work with your own instance of Sun are detailed below, if you want to get a more thorough understanding of how it actually works then full details are in the next section.
If the data connector is already doing what you need but you want to use it in another app, then you can simply re-use it by selecting it when you create an external dropdown. If you want to take an existing data connector and make it look at a different instance of Sun (e.g. take one pointing at demonstration data and use it on your live system) then you will need the following information:
- The URL of your SSC instance, this will be something like https://ssc.your-company-web-address.com/sunsystems-connect/soap/.
- A user ID and password of a valid SunSystems user. It is recommended to create one specifically for API interactions.
The first step would be to make a copy of the existing data connector to work on, in this example we are using the 'Supplier' data connector. You can then edit this data connector and make the following changes:
- Edit the first SendHttpRequest step described as 'GetSecurityToken' and change the relevant parts of the URL and content as shown below:
- Edit the second SendHttpRequest step described as 'SendRequestToSunSystems' and change the relevant parts of the URL to point to your Sun instance as shown below:
The data connector should now be pointing at your instance of SunSystems. It is set to use 'PK1' as the default business unit, in order to change this use a parameter of 'business_unit' when using the data connector in a form. Any foundation apps will already have this parameter as part of their design.
Adapting data connectors that look at other types of SunSystems data will work in the same way. You will need to change the URL of the two 'SendHttpRequest' steps and the user ID and password of the SunSystems account used.